
(defconst my/unicode-emoji
  '(("wei xiao" . "🙂") ("da xiao" . "😀") ("hao chi" . "😋") ("hua ji" . "🤪")
    ("xiao ku" . "😂") ("gan ga" . "😅") ("xi xi" . "😆") ("mo jing" . "😎")
    ("se" . "😍") ("fei wen" . "😘️") ("qin qin" . "😙") ("tou xiao" . "🤭")
    ("chong bai" . "🤩‍") ("de yi" . "😏") ("si kao" . "🤔") ("an jing" . "🤫")
    ("bai yan" . "🙄") ("wu yu" . "😐") ("ci ya" . "😬") ("tan qi" . "😮‍💨")
    ("e xin" . "🤢") ("ou tu" . "🤮") ("yun le" . "😵‍💫") ("bu man" . "☹")
    ("leng han" . "😰") ("fen nu" . "😡") ("sheng qi" . "😠")
    ("cai ni" . "🤑") ("wu nai" . "😓") ("chou" . "😔") ("nan guo" . "😒")
    ("shui jiao" . "😴") ("kun" .  "🥱") ("da ku" . "😭") ("kou zhao" . "😷")
    ("hong xin" . "🖤") ("xin sui" . "💔") ("hong chun" . "💋") ("guan cha" . "👀")
    ("tou gu" . "💀") ("ku lou" . "☠️") ("you ling" . "👻") ("xiong mao" . "🐼")
    ("jing yu" . "🐳") ("hai tun" . "🐬") ("gu tou" . "🦴")

    ("ji rou" . "💪")
    ("zhi zuo" . "👈") ("zhi you" . "👉") ("zhi shang" . "👆") ("zhi xia" . "👇")
    ("love you" . "🤟") ("bi ye" . "✌️") ("bi xin" . "🤞") ("call" . "🤙")
    ("shou" . "🖐️") ("ok" . "👌") ("hao" . "👍") ("cha" . "👎") ("rock" . "🤘")
    ("gei li" . "✊") ("quan tou" . "👊") ("na nie" . "🤏") ("zhong zhi" . "🖕")
    ("gu zhang" . "👏") ("ju shou" . "🙌") ("wo shou" . "🤝") ("qi dao" . "🙏")

    ("xi gua" . "🍉") ("pu tao" . "🍇") ("tao zi" . "🍑") ("ping guo" . "🍎")
    ("xiang jiao" . "🍌") ("ji tui" . "🍗") ("mian bao" . "🍞") ("han bao" . "🍔")
    ("mian tiao" . "🍜") ("mi fan" . "🍚") ("jiao zi" . "🥟")

    ("nai cha" . "🧋") ("ka fei" . "☕") ("re cha" . "🍵") ("cha hu" . "🫖")
    ("pi jiu" . "🍺") ("hong jiu" . "🍷") ("gan bei" . "🍻") ("peng bei" . "🥂")

    ("zu qiu" . "⚽") ("lan qiu" . "🏀") ("miao biao" . "⏱️") ("nao zhong" . "⏰")
    ("qi che" . "🚗") ("lun yi" . "🦽") ("dan che" . "🛴") ("huo jian" . "🚀")
    ("fei ji" . "🛩️") ("gao tie" . "🚄") ("tuo la ji" . "🚜") ("mo tou" . "🏍")
    ("gou wu che" . "🛒")

    ("li hua" . "🎉") ("ma jiang" . "🀄") ("atom" . "⚛")
    ("nv" . "♀️") ("nan" . "♂️") ("xing bie" . "⚧")
    ("wei sheng jian" . "🚻") ("nan ce suo" . "🚹") ("nv ce suo" . "🚺")
    ("atm" . "🏧") ("xin feng" . "✉️") ("email" . "📧") ("ri li" . "📅")
    ("bao zhu" . "🧨") ("jiang pai" . "🏅") ("jiang bei" . "🏆")

    ("yun" . "☁️") ("duo yun" . "⛅") ("lei zhen yu" . "⛈️") ("qing zhuan yu" . "🌦️")
    ("yu" . "🌧️") ("xh" . "❄️") ("ty" . "🌞") ("yue liang" . "🌙")
    ("xing" . "⭐") ("yu san" . "☂️")
    ))

(defconst my/unicode-symbol
  ;; ≈ ≡ ≠ ＝ ≤≥ ＜ ＞ ≮ ≯ ∷ ± ＋ － × ÷ ／ ∫ ∮ ∝ ∞ ∧ ∨ ∑ ∏ ∪ ∩ ∈ ∵ ∴ ⊥ ‖
  ;; ∠ ⌒ ≌ ∽ √ （） 【】｛｝ Ⅰ Ⅱ ⊕ ⊙ ∥ α β γ δ ε ζ η θ Δ
  ;; α β γ δ ε ζ η θ ι κ λ μ ν ξ ο π ρ σ τ υ φ χ ψ ω
  ;; Α Β Γ Δ Ε Ζ Η Θ Ι Κ ∧ Μ Ν Ξ Ο ∏ Ρ ∑ Τ Υ Φ Χ Ψ Ω
  ;; а б в г д е ё ж з и й к л м н о п р с т у ф х ц ч ш щ ъ
  ;; ы ь э ю я
  ;; А Б В Г Д Е Ё Ж З И Й К Л М Н О П Р С Т У Ф Х Ц Ч Ш Щ Ъ
  ;; Ы Ь Э Ю Я
  ;; Δ

  '(
    ;; 数学符号
    ("dui" . "✓") ("cha" . "✕") ("~" . "～")
    ("+" . "＋") ("-" . "－") ("*" . "×") ("/" . "÷") ("!=" . "≠") ("~~" . "≈")
    (">=" . "⩾") ("<=" . "⩽") (">==" . "⫺") ("<==" . "⫹")
    ("ss" . "§") ("+-" . "±") ("micro" . "µ") ("fn" . "ʩ")
    ("ng" . "ŋ") ("lambda" . "λ") ("sigma" . "∑")
    ("f" . "⨍") ("fo" . "∮") ("summa" . "∫") ("summa2" . "∬") ("summa3" . "∭")
    ("a" . "α") ("b" . "β") ("y" . "γ") ("o" . "σ") ("p". "ρ") ("e" . "ε")
    ("6" . "б") ("m" . "ℳ") ("E" . "∈")
    ("log" . "㏒") ("mm" . "㎜") ("cm" . "㎝") ("km" . "㎞")
    ("mg" . "㎎") ("kg" . "㎏") ("cc" . "㏄")
    ("bai fen" . "%") ("qian fen" . "‰") ("wan fen" . "‱")
    ("mei yuan" . "$") ("rmb" . "¥") ("bt bi" . "฿")
    ("jt1" . "»") ("jt2" . "«") ("jt you" . "⇒") ("jt zuo" . "⇐")
    ("dian" . "•") ("kong xin dian" . "৹")
    ("shi shi du" . "℃") ("hua shi du" . "℉")
    ("copyright symbol" . "©") ("Sound recording copyright symbol" . "℗")
    ("registered" . "®")  ("traed mark" . "™") ("numero" . "№") ("mw" . "ʘ")
    ("zhi jing" . "⌀") ("Theta" . "Θ") ("theta" . "θ") ("acidfree" . "♾")

    ;; 罗马数字
    ("lm1" . "Ⅰ") ("lm2" . "Ⅱ") ("lm3" . "Ⅲ") ("lm4" . "Ⅳ")
    ("lm5" . "Ⅴ") ("lm6" . "Ⅵ") ("lm7" . "Ⅶ") ("lm8" . "Ⅷ")
    ("lm9" . "Ⅸ") ("lm10" . "Ⅹ") ("lm11" . "Ⅺ") ("lm12" . "Ⅻ")

    ;; 上标
    ("^0" . "⁰") ("^1" . "¹") ("^2" . "²") ("^3" . "³") ("^4" . "⁴")
    ("^5" . "⁵") ("^6" . "⁶") ("^7" . "⁷") ("^8" . "⁸") ("^9" . "⁹")
    ("^+" . "⁺") ("^-" . "⁻") ("^=" . "⁼") ("^(" . "\⁽") ("^)" . "\⁾")
    ("^a" . "ᵃ") ("^b" . "ᵇ") ("^c" . "ᶜ") ("^d" . "ᵈ") ("^e" . "ᵉ")
    ("^f" . "ᶠ") ("^g" . "ᵍ") ("^h" . "ʰ") ("^i" . "ⁱ") ("^j" . "ʲ")
    ("^k" . "ᵏ") ("^l" . "ˡ") ("^m" . "ᵐ") ("^n" . "ⁿ") ("^o" . "ᵒ")
    ("^p" . "ᵖ") ("^r" . "ʳ") ("^s" . "ˢ") ("^t" . "ᵗ") ("^u" . "ᵘ")
    ("^v" . "ᵛ") ("^w" . "ʷ") ("^x" . "ˣ") ("^y" . "ʸ") ("^z" . "ᶻ")
    ("^A" . "ᴬ") ("^B" . "ᴮ") ("^D" . "ᴰ") ("^E" . "ᴱ") ("^G" . "ᴳ")
    ("^H" . "ᴴ") ("^I" . "ᴵ") ("^J" . "ᴶ") ("^K" . "ᴷ") ("^L" . "ᴸ")
    ("^M" . "ᴹ") ("^N" . "ᴺ") ("^O" . "ᴼ") ("^P" . "ᴾ") ("^R" . "ᴿ")
    ("^T" . "ᵀ") ("^U" . "ᵁ") ("^V" . "ⱽ") ("^W" . "ᵂ")

    ;; 下标
    ("_0" . "₀") ("_1" . "₁") ("_2" . "₂") ("_3" . "₃") ("_4" . "₄")
    ("_5" . "₅") ("_6" . "₆") ("_7" . "₇") ("_8" . "₈") ("_9" . "₉")
    ("_+" . "₊") ("_-" . "₋") ("_=" . "₌")
    ("_o" . "。") ("_(" . "\₍") ("_)" . "\₎")
    ("_a" . "ₐ") ("_e" . "ₑ") ("_h" . "ₕ") ("_i" . "ᵢ") ("_j" . "ⱼ")
    ("_k" . "ₖ") ("_l" . "ₗ") ("_m" . "ₘ") ("_n" . "ₙ") ("_o" . "ₒ")
    ("_p" . "ₚ") ("_r" . "ᵣ") ("_s" . "ₛ") ("_t" . "ₜ") ("_u" . "ᵤ")
    ("_v" . "ᵥ") ("_x" . "ₓ") ("_schwa" . "ₔ")

    ;; 分数
    ("fraction_1_2" . "½") ("fraction_1_4" . "¼") ("fraction_3_4" . "¾")
    ("fraction_1_7" . "⅐") ("fraction_1_9" . "⅑") ("fraction_1_1" . "⅒")
    ("fraction_1_3" . "⅓") ("fraction_2_3" . "⅔") ("fraction_1_5" . "⅕")
    ("fraction_2_5" . "⅖") ("fraction_3_5" . "⅗") ("fraction_4_5" . "⅘")
    ("fraction_1_6" . "⅙") ("fraction_5_6" . "⅚") ("fraction_1_8" . "⅛")
    ("fraction_3_8" . "⅜") ("fraction_5_8" . "⅝") ("fraction_7_8" . "⅞")
    ("fraction_1_" . "⅟")

    ;; 修饰数字
    ("q1" . "①") ("q2" . "②") ("q3" . "③") ("q4" . "④") ("q5" . "⑤")
    ("q6" . "⑥") ("q7" . "⑦") ("q8" . "⑧") ("q9" . "⑨")
    ("1" . "㈠") ("2" . "㈡") ("3" . "㈢") ("4" . "㈣") ("5" . "㈤")
    ("6" . "㈥") ("7" . "㈦") ("8" . "㈧") ("9" . "㈨") ("10" . "㈩")
    ("zhen" . "㊣")
    ))

(defun my/insert-unicode (&optional arg)
  (let* ((charset (or arg my/unicode-emoji))
         (key (completing-read "Enter emoji symbol: "
                               (let ((result '()))
                                 (dolist (e charset)
                                   (push  (concat (car e) ":" (cdr e)) result))
                                 result)))
         (char nil))
    (dolist (em charset)
      (when (string-equal (car (split-string key ":")) (car em))
        (setq char (cdr em))
        ))
    (if char
        (insert char)
      (message "Can't find [ %s ]!" key))
    ))

(defalias 'my/insert-emoji (lambda () (interactive)
                                 (my/insert-unicode my/unicode-emoji)))

(defalias 'my/insert-symbol (lambda () (interactive)
                                 (my/insert-unicode my/unicode-symbol)))

(provide 'my/unicode)
